home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-16 | 18.4 KB | 678 lines | [TEXT/MPS ] |
- //========================================================================================
- // File: Views.fr
- // Release Version: $ ODF 3 $
- //
- // Contains: Resources defining the Form part's views
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //========================================================================================
-
- #ifndef FWRESFIL_K
- #include "FWResFil.k"
- #endif
-
- #ifndef FWVIEWS_FR
- #include "FWViews.fr"
- #endif
-
- #ifndef FWNOTDEF_H
- #include "FWNotDef.h"
- #endif
-
- #ifndef DEFINES_K
- #include "Defines.k"
- #endif
-
- #ifndef FWGRCTL_FR
- #include "FWGrCtl.fr"
- #endif
-
- //========================================================================================
- // Defines
- //========================================================================================
-
- /*
- This view layout was designed for a "full size" frame;
- the content view's extent (logical size) is the same as its physical size.
- At runtime the frame will almost certainly be smaller; it'll be resized down.
- */
-
- #define true 1
- #define false 0
- #define kFrameX 492
- #define kFrameY 576
- #define kFixedFrameX FW_FIX (kFrameX)
- #define kFixedFrameY FW_FIX (kFrameY)
- #define kScrollbarSize 16
- #define kScrollbarOverlap 1
- #define kContentX (kFrameX - kScrollbarSize + kScrollbarOverlap)
- #define kContentY (kFrameY - kScrollbarSize + kScrollbarOverlap)
- #define kEmbContentX (kFrameX - kScrollbarSize)
- #define kEmbContentY (kFrameY - kScrollbarSize)
- #define LABEL_FONT { FW_FIX (12), FW_kPlain, "Palatino" }
- #define WBOUNDS(L,T,W,H) FW_BOUNDS (L, T, L + W, T + H)
-
- //========================================================================================
- // type RFormView
- //========================================================================================
-
- type RFormView : FW_RPictSView(Label='Frmv')
- {
- // This class adds a picture ID and 2 radio-clusters to FW_RSuperView
- // (See code in CFormView::InitializeFromStream()).
- Picture2:
- integer;
-
- FW_RRadioCluster;
- FW_RRadioCluster;
- };
-
- //========================================================================================
- // type RScrollEdit
- //========================================================================================
- // Custom scrolling edit view
-
- type RScrollEdit : FW_REditView(Label='Sedv')
- {
- HorizViewID:
- longint; // Horizontal scrollbar id, or 0 for no scrollbar
- VertViewID:
- longint; // Vertical scrollbar id, or 0 for no scrollbar
- TextWidth:
- FW_RFixed; // text width (or 0 to use same width as view)
- };
-
- //========================================================================================
- // type RPwdEditView
- //========================================================================================
- // Custom edit view to type hidden passwords
-
- type RPwdEditView : FW_REditView (Label='Pwdv')
- {
- };
-
- //========================================================================================
- // resource FW_RFrameLayout (kRootFormView)
- //========================================================================================
- // See constants in "FWViews.k", macros & resource types in "FWViews.fr"
-
- resource FW_RFrameLayout (kRootFormView)
- {
- //
- // Planned view layout size
- //
-
- FW_POINT (kFrameX, kFrameY),
-
- //
- // Views
- // We use an includeView to get at the kFormContentView layout.
- // Also we add scrollbars.
- //
-
- {
- FW_RIncludeView (
- 0,
- FW_BOUNDS (0, 0, kContentX, kContentY),
- FW_kFitToEnclosure,
- FW_POINT (kContentX, kContentY),
- false, // not the content view
- FW_kNoScrolling,
- {}, // no direct subviews
- kFormContentView
- ),
- FW_RScrollBar (
- kHorzScrollBarID,
- FW_STDHORIZONTALSB (kFixedFrameX, kFixedFrameY),
- FW_kHScrollBarBinding,
- 0, 0, 0, 0, 1, FW_ONE, FW_ONE // all values are fixed up at runtime
- ),
- FW_RScrollBar (
- kVertScrollBarID,
- FW_STDVERTICALSB (kFixedFrameX, kFixedFrameY),
- FW_kVScrollBarBinding,
- 0, 0, 0, 0, 1, FW_ONE, FW_ONE // all values are fixed up at runtime
- ),
- FW_RGrowBox (
- kGrowBoxID,
- FW_STDGROWBOX (kFixedFrameX, kFixedFrameY),
- FW_kGrowBoxBinding
- )
- },
-
- //
- // The scroller hooks up scrollbars and the content view;
- // there is only one per frame.
- //
-
- {
- FW_RScrollBarScroller (
- 0, // what is auto-scroll inset?
- FW_POINT (16, 16), // scroll units
- true, // page up and page down
- true, // live scrolling
- kHorzScrollBarID,
- kVertScrollBarID
- )
- }
-
- };
-
- //========================================================================================
- // resource FW_RFrameLayout (kEmbeddedFormView)
- //========================================================================================
- // See constants in "FWViews.k", macros & resource types in "FWViews.fr"
-
- resource FW_RFrameLayout (kEmbeddedFormView)
- {
- //
- // Planned view layout size
- //
-
- FW_POINT (kFrameX, kFrameY),
-
- //
- // Views
- // We use an includeView to get at the kFormContentView layout.
- // Also we add scrollbars.
- //
-
- {
- FW_RIncludeView (
- 0,
- FW_BOUNDS (0, 0, kEmbContentX, kEmbContentY),
- FW_kFitToEnclosure,
- FW_POINT (kContentX, kContentY),
- false, // not the content view
- FW_kNoScrolling,
- {}, // no direct subviews
- kFormContentView
- ),
- FW_RScrollBar (
- kHorzScrollBarID,
- FW_STDHORIZONTALSB (kFixedFrameX, kFixedFrameY),
- FW_kHScrollBarBinding,
- 0, 0, 0, 0, 1, FW_ONE, FW_ONE // all values are fixed up at runtime
- ),
- FW_RScrollBar (
- kVertScrollBarID,
- FW_STDVERTICALSB (kFixedFrameX, kFixedFrameY),
- FW_kVScrollBarBinding,
- 0, 0, 0, 0, 1, FW_ONE, FW_ONE // all values are fixed up at runtime
- )
- // Compared to root view we don't have a growbox
- },
-
- //
- // The scroller hooks up scrollbars and the content view;
- // there is only one per frame.
- //
-
- {
- FW_RScrollBarScroller (
- 0, // what is auto-scroll inset?
- FW_POINT (16, 16), // scroll units
- true, // page up and page down
- true, // live scrolling
- kHorzScrollBarID,
- kVertScrollBarID
- )
- }
- };
-
- //========================================================================================
- // resource FW_RFrameLayout (kPrintFormView)
- //========================================================================================
-
- resource FW_RFrameLayout (kPrintFormView)
- {
- //
- // Planned view layout size
- //
-
- FW_POINT (kFrameX, kFrameY),
-
- //
- // Views
- // We use an includeView to get at the kFormContentView layout.
- // Also we add scrollbars.
- //
-
- {
- FW_RIncludeView (
- 0,
- FW_BOUNDS (0, 0, kFrameX, kFrameY),
- FW_kFitToEnclosure,
- FW_POINT (kContentX, kContentY),
- false, // not the content view
- FW_kNoScrolling,
- {}, // no direct subviews
- kFormContentView
- ),
- // Compared to embedded view we don't have scrollbars
- // Compared to root view we don't have a growbox
- },
- {} // We don't have a scroller either.
- };
-
- //========================================================================================
- // resource FW_RViewLayout (kFormContentView)
- //========================================================================================
-
- resource FW_RViewLayout (kFormContentView)
- {
- //
- // Planned view layout size
- //
-
- FW_POINT (kContentX, kContentY),
-
- //
- // Views
- //
-
- {
- RFormView (
- kFormViewID,
- FW_BOUNDS (0, 0, kContentX, kContentY),
- FW_kFitToEnclosure, // not true - is overridden in AdjustToNewLayout
- FW_POINT (kContentX, kContentY),
- true, // is content view / scrolling view
- FW_kXYScrolling,
-
- //
- // Subviews
- //
-
- {
- FW_REditView ( // First name
- kFirstNameEdViewID, // view id
- FW_BOUNDS(272,56,272+192,76), // bounds
- FW_kFixedBounds, // binding
- 20, // max chars
- 9, // attributes
- FW_SYSTEM_FONT,
- "" // initial text
- ),
- FW_REditView ( // Last name
- kLastNameEdViewID, // view id
- FW_BOUNDS(272,80,272+192,100),
- FW_kFixedBounds, // binding
- 20, // max chars
- 9, // attributes
- FW_SYSTEM_FONT,
- "" // initial text
- ),
- FW_REditView ( // member name
- kMemberNameEdViewID, // view id
- FW_BOUNDS(272,104,272+192,124),
- FW_kFixedBounds, // binding
- 20, // max chars
- 9, // attributes
- FW_SYSTEM_FONT,
- "" // initial text
- ),
- FW_REditView ( // e-mail address
- kEMailEdViewID, // view id
- FW_BOUNDS(272,128,272+192,148),
- FW_kFixedBounds, // binding
- 30, // max chars
- 9, // attributes
- FW_SYSTEM_FONT,
- "" // initial text
- ),
- FW_RScrollBar ( // Vertical scrollbar for text-edit
- kEditVScrollBarID, // view id
- FW_BOUNDS(448,420,448+kScrollbarSize,420+96),
- FW_kFixedBounds, // view binding
- 0, // control message
- 0, // control receiver
- 0, // control value
- 0, // SB Min Value (adjusted at runtime)
- 1, // SB Max Value (adjusted at runtime)
- FW_ONE, // SB Minor Units (adjusted at runtime)
- FW_ONE // SB Major Units (adjusted at runtime)
- ),
- RScrollEdit ( // Comments (custom scrolling edit view)
- kCommentsEdViewID, // view id
- FW_BOUNDS(8,420,449,420+96),
- FW_kFixedBounds, // binding
- -1, // max chars (32K)
- 13, // attributes
- FW_NORMAL_FONT,
- "", // initial text
- 0, // kEditHScrollBarID, // Horizontal SB
- kEditVScrollBarID, // Vertical SB
- FW_FIX(441) // text width (used only with horiz SB)
- ),
- FW_RButton (
- kSubscribeCheckID, // view id
- FW_BOUNDS(12,152,12+192,152+16),
- FW_kFixedBounds, // binding
- FW_kButtonPressedMsg, // control message
- 0, // control receiver
- 1, // control value
- FW_kCheckButton, // button kind
- FW_SYSTEM_FONT,
- "Subscribe to ODFFlash"
- ),
- FW_RListBox (
- kPlatformListBoxID, // view id
- FW_BOUNDS(272,224,272+180,224+76),
- FW_kFixedBounds, // binding
- 10, // number of rows
- 1, // vertical SB
- 0, // single selection
- 1, // use focus frame
- 0, // use clientdata
- FW_kListBoxDoubleClickedMsg, // DblClick message
- FW_SYSTEM_FONT, // font
- { // List of strings
- "Mac OS",
- "OS/2 Warp",
- "Windows 95",
- "Windows NT",
- "IBM AIX",
- "Sun Sparc Solaris",
- "Sun OS 4.1.x",
- "HP /UX",
- "Unix IRIX",
- "Unix Linux"
- }
- ),
- FW_RButton (
- kAddButtonID, // view id
- FW_BOUNDS(372,304,372+64,324),
- FW_kFixedBounds, // binding
- FW_kButtonPressedMsg, // control message
- FW_kFrameReceiver, // receiver
- 0, // control value
- FW_kPushButton, // button kind
- FW_SYSTEM_FONT,
- "Add"
- ),
- FW_RButton (
- kRemoveButtonID, // view id
- FW_BOUNDS(296,304,296+64,324),
- FW_kFixedBounds, // binding
- FW_kButtonPressedMsg, // control message
- FW_kFrameReceiver, // receiver
- 0, // control value
- FW_kPushButton, // button kind
- FW_SYSTEM_FONT,
- "Remove"
- ),
- FW_RPopupMenu (
- kBrowseTimePopupID, // view id
- FW_BOUNDS(68,320,68+192,340),
- FW_kFixedBounds, // binding
- FW_kPopupClickedMsg, // control message
- FW_kFrameReceiver, // control receiver
- 0, // control value
- kBrowseTimeMenuResID, // Mac menu id
- 0, // title width
- 2, // Initial menu item
- 0, // Menu variation
- 0, // Menu refCon
- FW_SYSTEM_FONT,
- "" // title
- ),
- FW_RPopupMenu (
- kOnlineTimePopupID, // view id
- FW_BOUNDS(72,380,72+192,400),
- FW_kFixedBounds, // binding
- FW_kPopupClickedMsg, // control message
- 0, // control receiver
- 0, // control value
- kOnlineTimeMenuResID, // Mac menu id
- 0, // title width
- 1, // Initial menu item
- 0, // Menu variation
- 0, // Menu refCon
- FW_SYSTEM_FONT,
- "" // title
- ),
- FW_RGroupBox (
- 0, // view id
- FW_BOUNDS(12,208,12+248,208+72),
- FW_kFixedBounds, LABEL_FONT, FW_RGB_WHITE,
- "How did you discover ODFWired?"
- ),
- FW_RButton (
- kWordOfMouthRadioID, // view id
- FW_BOUNDS(20,224,20+232,224+16),
- FW_kFixedBounds, // binding
- 0, // control message
- 0, // control receiver
- 0, // control value
- FW_kRadioButton, // button kind
- FW_SYSTEM_FONT,
- "Word of mouth"
- ),
- FW_RButton (
- kHyperLinkRadioID, // view id
- FW_BOUNDS(20,240,20+232,240+16),
- FW_kFixedBounds, // binding
- 0, // control message
- 0, // control receiver
- 0, // control value
- FW_kRadioButton, // button kind
- FW_SYSTEM_FONT,
- "Hyperlink from another site:"
- ),
- FW_RButton (
- kMacTechRadioID, // view id
- FW_BOUNDS(20,256,20+232,256+16),
- FW_kFixedBounds, // binding
- 0, // control message
- 0, // control receiver
- 1, // control value
- FW_kRadioButton, // button kind
- FW_SYSTEM_FONT,
- "Magazine Advertisment"
- ),
- FW_RButton (
- kYesRadioID, // view id
- FW_BOUNDS(400,348,468,348+16),
- FW_kFixedBounds, // binding
- 0, // control message
- 0, // control receiver
- 0, // control value
- FW_kRadioButton, // button kind
- FW_SYSTEM_FONT,
- "Yes"
- ),
- FW_RButton (
- kNoRadioID, // view id
- FW_BOUNDS(400,364,468,364+16),
- FW_kFixedBounds, // binding
- FW_kButtonPressedMsg, // control message
- FW_kFrameReceiver, // control receiver
- 0, // control value
- FW_kRadioButton, // button kind
- FW_SYSTEM_FONT,
- "No"
- ),
- FW_RButton (
- kSubscribeButtonID, // view id
- FW_BOUNDS(336,528,336+128,528+20),
- FW_kFixedBounds, // binding
- FW_kButtonPressedMsg, // control message
- FW_kFrameReceiver, // receiver
- 0, // control value
- FW_kPushButton, // button kind
- FW_SYSTEM_FONT,
- "Join ODFWired!"
- )
- FW_RGraphicControl (0,
- WBOUNDS (48, 12, 32, 32),
- FW_kFixedBounds,
- 0, 0, 0, {
- 0, FW_RGraphicIcon (1000)
- }
- ),
- FW_RGraphicControl (0,
- WBOUNDS (396, 12, 32, 32),
- FW_kFixedBounds,
- 0, 0, 0, {
- 0, FW_RGraphicIcon (1001)
- }
- ),
- FW_RStaticText (0,
- WBOUNDS(272,348,124,52),
- FW_kFixedBounds, LABEL_FONT, FW_RGB_WHITE,
- "Do you plan to write components in Java?"
- ),
- FW_RStaticText (0,
- WBOUNDS(8,404,256,16),
- FW_kFixedBounds, LABEL_FONT, FW_RGB_WHITE,
- "Additional comments for the ODF team:"
- ),
- FW_RStaticText (0,
- WBOUNDS(272,208,180,16),
- FW_kFixedBounds, LABEL_FONT, FW_RGB_WHITE,
- "Which platforms do you use?"
- ),
- FW_RStaticText ('titl',
- WBOUNDS(84,12,308,32),
- FW_kFixedBounds,
- { FW_FIX (32), FW_kPlain, "Helvetica" },
- FW_RGB_WHITE,
- "Join ODFWired!"
- ),
- FW_RStaticText (0,
- WBOUNDS(12,128,256,20),
- FW_kFixedBounds, LABEL_FONT, FW_RGB_WHITE,
- "Enter your email address:"
- ),
- FW_RStaticText (0,
- WBOUNDS(12,80,256,20),
- FW_kFixedBounds, LABEL_FONT, FW_RGB_WHITE,
- "Enter your last name:"
- ),
- FW_RStaticText (0,
- WBOUNDS(12,56,256,20),
- FW_kFixedBounds, LABEL_FONT, FW_RGB_WHITE,
- "Enter your first name:"
- ),
- FW_RStaticText (0,
- WBOUNDS(12,104,256,20),
- FW_kFixedBounds, LABEL_FONT, FW_RGB_WHITE,
- "Pick a member name (lowercase only):"
- ),
- FW_RStaticText (0,
- WBOUNDS(12,168,452,36),
- FW_kFixedBounds, LABEL_FONT, FW_RGB_WHITE,
- "The best way to hear about new content and upcoming events "
- "is to subscribe to the weekly ODFWired email newsletter."
- ),
- FW_RStaticText (0,
- WBOUNDS(8,344,256,32),
- FW_kFixedBounds, LABEL_FONT, FW_RGB_WHITE,
- "How long have you had Web access, either through commercial "
- "service or an ISP?"
- ),
- FW_RStaticText (0,
- WBOUNDS(12,284,248,32),
- FW_kFixedBounds, LABEL_FONT, FW_RGB_WHITE,
- "During a typical week, how much time do you spend browsing the Web?"
- ),
- }, // End list of Subviews
-
- //
- // FormView continued...
- //
-
- kFormPict1, // blank picture
- kFormPict2, // confirmation picture
-
- //
- // RadioClusters will be replaced by FW_CClusterView post-R3
- //
-
- FW_RRadioCluster (
- { kWordOfMouthRadioID, kHyperLinkRadioID, kMacTechRadioID }
- ),
- FW_RRadioCluster (
- { kYesRadioID, kNoRadioID }
- )
- )
- }
- }
-
- //========================================================================================
- // resource FW_RFrameLayout(kPasswordDialog)
- //========================================================================================
- // See constants in "FWViews.k", macros & resource types in "FWViews.fr"
-
- resource FW_RFrameLayout(kPasswordDialog)
- {
- FW_POINT (100, 100), // LayoutSize
-
- { // Start list of frame's subviews
- FW_RStaticText
- (
- 0, // view id
- FW_BOUNDS(20, 40, 140, 60),
- FW_kFixedBounds, // binding
- FW_NORMAL_FONT,
- FW_RGB_LIGHT_GRAY, // erase color
- "Pick a password:"
- ),
- FW_RStaticText
- (
- 0, // view id
- FW_BOUNDS(20, 70, 140, 90),
- FW_kFixedBounds, // binding
- FW_NORMAL_FONT,
- FW_RGB_LIGHT_GRAY, // erase color
- "Retype to verify:"
- ),
- RPwdEditView // edit view to enter new password
- (
- kPasswordEditID, // view id
- FW_BOUNDS(150, 40, 280, 60),
- FW_kFixedBounds, // binding
- 10, // max chars
- 9, // attributes
- FW_NORMAL_FONT,
- "" // initial text
- ),
- RPwdEditView // edit view to confirm password
- (
- kConfirmEditID, // view id
- FW_BOUNDS(150, 70, 280, 90),
- FW_kFixedBounds, // binding
- 10, // max chars
- 9, // attributes
- FW_NORMAL_FONT,
- "" // initial text
- ),
- FW_RButton
- (
- kOKButtonID, // view id
- FW_BOUNDS(180, 120, 260, 148),
- FW_kFixedBounds, // binding
- FW_kDefaultButtonMsg, // "OK" message
- 0, // receiver = dialogFrame by default
- 0, // control value
- FW_kDefaultPushButton, // button kind (with outline)
- FW_SYSTEM_FONT,
- "OK"
- ),
- FW_RButton
- (
- kCancelButtonID, // view id
- FW_BOUNDS(60, 123, 120, 145),
- FW_kFixedBounds, // binding
- FW_kCancelButtonMsg, // "Cancel" message
- 0, // receiver = dialogFrame by default
- 0, // control value
- FW_kPushButton, // button kind
- FW_SYSTEM_FONT,
- "Cancel"
- )
- }, // End list of frame's subviews
- { } // no scroller
- };
-